﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.PhysicsSystem
{
    public class MoveTestBVH : MonoBehaviour
    {
        public PhysicsObject physicsObject;
        public Transform toPoint;
        public int bvhID;


        void Update()
        {
            DoMove();
        }

        [ContextMenu("Move To Point")]
        void DoMove()
        {
            PhysicsUtil.StepMoveTo(physicsObject
                , toPoint.position
                , PhysicsUtil.StepMoveOptions.Create().SetBvh(bvhID));
        }
    }
}
